<?php

namespace app\backend\controller\sys;

use app\common\controller\Basic;
use app\common\service\sys\LogService;

/**
 * 系统日志
 * @author kaige
 * @date 2022-04-29
 */
class Log extends Basic
{
    // 初始化
    protected function initialize()
    {
        parent::initialize();
        // 当前控制器服务实例化
        $this->service = new LogService();
    }
    /**
     * 列表
     * @return array|string
     */
    public function index()
    {
        if ($this->request->isGet()) {
            $data = input('param.');
            return json($this->service->_list($data));
        }
        return _jerr(1000);
    }

    /**
     * 删除
     */
    public function del()
    {
        if ($this->request->isPost()) {
            $id = input('id/s', '');
            return json($this->service->_del($id));
        }
        return _jerr(1000);
    }
}
